﻿using Microsoft.AspNetCore.SignalR;

namespace WMSManage.Hubs
{
    public class ChatHub: Hub
    {
        //实现实时双向通信的核心组件
        public async Task SendMessage(string user, string message)
        {
            //向所有客户端发送消息
            await Clients.All.SendAsync("ReceiveMessage", user, message);
        }
    }
}
